<template>
  <el-container class="layout-container-demo" style="height: 100%">
    <el-aside width="200px">
      <el-scrollbar>
        <el-menu router :default-openeds="['1', '2', '3','4']">
          <el-sub-menu index="1">
            <template #title>
              <el-icon></el-icon>管理员管理
            </template>
            <el-menu-item-group>
              <template #title>管理员</template>
              <el-menu-item index="/newadmin">新建管理员</el-menu-item>
              <el-menu-item index="/adminlist">管理员列表</el-menu-item>
            </el-menu-item-group>
          </el-sub-menu>
          <el-sub-menu index="2">
            <template #title>
              <el-icon></el-icon>用户管理
            </template>
            <el-menu-item-group>
              <template #title>用户</template>
              <el-menu-item index="/userlist">用户列表</el-menu-item>
            </el-menu-item-group>
          </el-sub-menu>
          <el-sub-menu index="3">
            <template #title>
              <el-icon></el-icon>留言管理
            </template>
            <el-menu-item-group>
              <template #title>留言</template>
              <el-menu-item index="/messagelist">留言列表</el-menu-item>
            </el-menu-item-group>
          </el-sub-menu>
          <el-sub-menu index="4">
            <template #title>
              <el-icon></el-icon>菜单管理
            </template>
            <el-menu-item-group>
              <template #title>菜单</template>
              <el-menu-item index="/menulist">菜单列表</el-menu-item>
            </el-menu-item-group>
          </el-sub-menu>
          <el-sub-menu index="5">
            <template #title>
              <el-icon></el-icon>食材管理
            </template>
            <el-menu-item-group>
              <template #title>食材</template>
              <el-menu-item index="/foodlist">食材列表</el-menu-item>
              <el-menu-item index="/addfood">购买食材</el-menu-item>
            </el-menu-item-group>
          </el-sub-menu>
          
        </el-menu>
      </el-scrollbar>
    </el-aside>

    <el-container>
      <el-header style="text-align: right; font-size: 22px;background-color:skyblue ">
        <div class="toolbar">
          <span>Tom</span>
        </div>
      </el-header>

      <el-main>
        <router-view></router-view>
      </el-main>
    </el-container>
  </el-container>
</template>

<script>
export default {
  name:'Home',

}
</script>

<style scoped>
/* .layout-container-demo .el-header {
  position: relative;
  background-color: var(--el-color-primary-light-7);
  color: var(--el-text-color-primary);
} */
/* .layout-container-demo .el-aside {
  color: var(--el-text-color-primary);
  background-color: aquamarine;
} */
.layout-container-demo .el-menu {
  border-right: none;
}
.layout-container-demo .el-main {
  padding: 0;
}
.layout-container-demo .toolbar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  right: 20px;
}
</style>
